package com.equipment.system.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * ${DESCRIPTION}
 *
 * @author 杨凯
 * @create 2018-03-19 14:37
 **/
@Alias("equipment")
public class Equipment extends Model<Equipment> {
	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@TableId(type = IdType.AUTO)
	private int id;
	/**
	 * 指令码
	 */
	@TableField(fill = FieldFill.INSERT)
	private String machineCode;

	/**
	 * 激活码
	 */
	private String pollCode;
	/**
	 * 版本号
	 */
	private String version;
	/**
	 * 省份
	 */
	private String province;
	/**
	 * 城市
	 */
	private String city;

	/**
	 * 联系人
	 */
	private String contacts;


	/**
	 * 联系人电话
	 */
	private String contactNumber;

	/**
	 * 激活状态
	 */
	private int activatedState;

	private Timestamp created;

	@TableField(exist = false)
	private EquipmentInfo equipmentInfo;


	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getMachineCode() {
		return machineCode;
	}

	public void setMachineCode(String machineCode) {
		this.machineCode = machineCode;
	}

	public String getPollCode() {
		return pollCode;
	}

	public void setPollCode(String pollCode) {
		this.pollCode = pollCode;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getContacts() {
		return contacts;
	}

	public void setContacts(String contacts) {
		this.contacts = contacts;
	}

	public String getContactNumber() {
		return contactNumber;
	}

	public void setContactNumber(String contactNumber) {
		this.contactNumber = contactNumber;
	}

	public int getActivatedState() {
		return activatedState;
	}

	public void setActivatedState(int activatedState) {
		this.activatedState = activatedState;
	}

	public Timestamp getCreated() {
		return created;
	}

	public void setCreated(Timestamp created) {
		this.created = created;
	}

	public EquipmentInfo getEquipmentInfo() {
		return equipmentInfo;
	}

	public void setEquipmentInfo(EquipmentInfo equipmentInfo) {
		this.equipmentInfo = equipmentInfo;
	}

	@Override
	public String toString() {
		return "Equipment{" +
				"id=" + id +
				", machineCode='" + machineCode + '\'' +
				", pollCode='" + pollCode + '\'' +
				", version='" + version + '\'' +
				", province='" + province + '\'' +
				", city='" + city + '\'' +
				", contacts='" + contacts + '\'' +
				", contactNumber='" + contactNumber + '\'' +
				", activatedState=" + activatedState +
				", created=" + created +
				", equipmentInfo=" + equipmentInfo +
				'}';
	}
}
